/*
 * @Description  :
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2021-12-13 10:36:49
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-01-18 17:13:29
 * @FilePath     : \\tms-obc-web\\src\\app\\shared\\widget\\dict-select\\dict-select.widget.ts
 * Copyright (C) 2022 huzhenhong. All rights reserved.
 */
import { Component, OnInit } from "@angular/core";
import { ControlWidget } from "@delon/form";

@Component({
  selector: 'sf-dict-select',
  templateUrl: './dict-select.widget.html',
  preserveWhitespaces: false,
})

export class DictSelectWidget extends ControlWidget implements OnInit {


  static readonly KEY = 'dict-select';
  /**
   * 字典数据数组
   */


  dictList: any[] = [];


  ngOnInit(): void {

  }

  change(value: string) {
    if (this.ui.change) this.ui.change(value);
    this.setValue(value);
  }

  reset(value: any) {
    if (value) this.setValue(value);
  }
}
